import {request} from "../utils/request";


//创建新的充值订单
export async function createOrder(data) {
    const res = await request({
        url: `/toporders`,
        method: 'POST',
        data
    }).catch()
    return res
}

//发起支付
export async function payOrder(data) {
    const res = await request({
        url: `/toporders/pay`,
        method: 'POST',
        data
    }).catch()
    return res
}

//主动查询订单结果
export async function checkOrder(data) {
    const res = await request({
        url: `/toporders/pay/query`,
        method: 'POST',
        data
    }).catch()
    return res
}
